package com.shen.accountbook.bean.temp;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

/**
 * author:  shen
 * date:    2018/8/30
 *
 * 第一级分类 -- "支出/收入"
 */
@Entity
public class FirstSortBean implements Parcelable {

    @Id
    private Long id;
    /** "支出/收入"ID */
    @Unique
    private Long first_sort_id;
    /** "支出/收入"名称 */
    private String first_sort_name;



    @Generated(hash = 1511689467)
    public FirstSortBean(Long id, Long first_sort_id, String first_sort_name) {
        this.id = id;
        this.first_sort_id = first_sort_id;
        this.first_sort_name = first_sort_name;
    }
    @Generated(hash = 1254180869)
    public FirstSortBean() {
    }



    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getFirst_sort_id() {
        return this.first_sort_id;
    }
    public void setFirst_sort_id(Long first_sort_id) {
        this.first_sort_id = first_sort_id;
    }
    public String getFirst_sort_name() {
        return this.first_sort_name;
    }
    public void setFirst_sort_name(String first_sort_name) {
        this.first_sort_name = first_sort_name;
    }

    @Override
    public String toString() {
        return "FirstSortBean{" +
                "id=" + id +
                ", first_sort_id=" + first_sort_id +
                ", first_sort_name='" + first_sort_name + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeValue(this.first_sort_id);
        dest.writeString(this.first_sort_name);
    }

    protected FirstSortBean(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.first_sort_id = (Long) in.readValue(Long.class.getClassLoader());
        this.first_sort_name = in.readString();
    }

    public static final Parcelable.Creator<FirstSortBean> CREATOR = new Parcelable.Creator<FirstSortBean>() {
        @Override
        public FirstSortBean createFromParcel(Parcel source) {
            return new FirstSortBean(source);
        }

        @Override
        public FirstSortBean[] newArray(int size) {
            return new FirstSortBean[size];
        }
    };
}
